Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: impl the new Agent extend http.Agent #69

Merged
merged 3 commits into from
Oct 22, 2018
Merged

Conversation

fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Oct 20, 2018

This is a BREAKING change.

Don't use patch mode anymore.
Improve code coverage to 100%.

This is a BREAKING change.

Don't use patch mode anymore.
Improve code coverage to 100%.
@codecov
Copy link

codecov bot commented Oct 20, 2018

Codecov Report

Merging #69 into master will increase coverage by 8.48%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #69      +/-   ##
========================================
+ Coverage   91.51%   100%   +8.48%     
========================================
  Files           4      4              
  Lines         283    176     -107     
========================================
- Hits          259    176      -83     
+ Misses         24      0      -24
Impacted Files Coverage Δ
lib/constants.js 100% <100%> (ø)
lib/agent.js 100% <100%> (+5%) ⬆️
lib/https_agent.js 100% <100%> (ø) ⬆️
index.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b81362...4089edd. Read the comment docs.

}

[INIT_SOCKET](socket, options) {
// bugfix here.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

又可以修复 node 的 bug 了。

https on node 8, 10 won't set agent.options.timeout by default
@fengmk2
Copy link
Member Author

fengmk2 commented Oct 21, 2018

I will merge today and use on npm.taobao.org for a week stable tests.

if (options.timeout === undefined) {
options.timeout = options.freeSocketKeepAliveTimeout * 2;
options.timeout = options.freeSocketTimeout * 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options.timeout = Math.max(options.freeSocketTimeout * 2, 30000);

if (options.timeout === undefined) {
options.timeout = options.freeSocketKeepAliveTimeout * 2;
options.timeout = options.freeSocketTimeout * 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options.timeout = Math.max(options.freeSocketTimeout * 2, 30000);

if (options.timeout === undefined) {
options.timeout = options.freeSocketKeepAliveTimeout * 2;
options.timeout = options.freeSocketTimeout * 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options.timeout = Math.max(options.freeSocketTimeout * 2, 30000);

if (options.timeout === undefined) {
options.timeout = options.freeSocketKeepAliveTimeout * 2;
options.timeout = options.freeSocketTimeout * 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options.timeout = Math.max(options.freeSocketTimeout * 2, 30000);

if (options.timeout === undefined) {
options.timeout = options.freeSocketKeepAliveTimeout * 2;
options.timeout = options.freeSocketTimeout * 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options.timeout = Math.max(options.freeSocketTimeout * 2, 30000);

if (options.timeout === undefined) {
options.timeout = options.freeSocketKeepAliveTimeout * 2;
options.timeout = options.freeSocketTimeout * 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options.timeout = Math.max(options.freeSocketTimeout * 2, 30000);

if (options.timeout === undefined) {
options.timeout = options.freeSocketKeepAliveTimeout * 2;
options.timeout = options.freeSocketTimeout * 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options.timeout = Math.max(options.freeSocketTimeout * 2, 30000);

if (options.timeout === undefined) {
options.timeout = options.freeSocketKeepAliveTimeout * 2;
options.timeout = options.freeSocketTimeout * 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options.timeout = Math.max(options.freeSocketTimeout * 2, 30000);

@fengmk2 fengmk2 merged commit 498c8f1 into master Oct 22, 2018
@fengmk2
Copy link
Member Author

fengmk2 commented Oct 22, 2018

竟然合并了才看的评论,我再提交一下。

@fengmk2 fengmk2 deleted the dont-patch-agent branch October 22, 2018 13:05
@fengmk2
Copy link
Member Author

fengmk2 commented Oct 22, 2018

4.0.0

@dead-horse
Copy link
Member

白天评论发不出来..

@skeggse
Copy link

skeggse commented Nov 13, 2019

What is the breaking change introduced in this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants